﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using System.Diagnostics;
using System.IO;
using System.Threading;
using ProjectDeployment.Model;

namespace ProjectDeployment
{
    enum ProjectType
    {
        WebService,
        WindowsService,
        WinForm,
        Wpf,
        Console
    }

    class Project
    {
        public string Name { get; set; }
        public ProjectType ProjectType { get; set; }
        public string InstallerPath { get; set; }
        public bool IsEnabled { get; set; }
        public string InstalledPath { get; set; }
        public string Parameters { get; set; }
        public XElement XmlConfiguration { get; set; }

        protected IInstallBehavior InstallBehavior;
        protected IUninstallBehavior UninstallBehavior;

        public void PerformInstall(string projectPath, string parameters)
        {
            InstallBehavior.Install(projectPath, parameters);
        }

        public void PerformUninstall(string projectPath, string parameters)
        {
            UninstallBehavior.Uninstall(projectPath, parameters);
        }

    }
}
